import {http} from "@/api/index";

const movie = {
    getAllMovie:'/userMovie/findAllByPage',
    getAllCinema:'/userMovie/findAllCinema',
    getCinema:'/userMovie/findCinemaById',
    getMovieShowInfoList:'/userMovie/findMovieShowInfoList',
    getSeatList:'/userMovie/findSeatInfo'

}
const order = {
    preCheckOrder:'/userOrder/preOrderCheck',
    addOrder:'/userOrder/order',
}


export const getAllMovie = (params)=>{
    return http.request({
        url:movie.getAllMovie,
        method:'get',
        params: params
    })
}
export const getAllCinema = (params)=>{
    return http.request({
        url:movie.getAllCinema,
        method:'get',
        params: params
    })
}
export const getCinema = (params)=>{
    return http.request({
        url:movie.getCinema,
        method:'get',
        params: params
    })
}
export const getMovieShowInfoList = (params)=>{
    return http.request({
        url:movie.getMovieShowInfoList,
        method:'get',
        params: params
    })
}
export const getSeatInfo = (params)=>{
    return http.request({
        url:movie.getSeatList,
        method:'get',
        params: params
    })
}

export const preCheckOrder = (params)=>{
    return http.request({
        url:order.preCheckOrder,
        method:'post',
        data: params
    })
}
export const addOrder = (params)=>{
    return http.request({
        url:order.addOrder,
        method:'post',
        data: params
    })
}
